﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CateEdit.aspx.cs" Inherits="Sdepci.InfoCode.Web.CodeIndex.CateEdit" %>
<%@ Register src="../Includes/VerifyLoginState.ascx" tagname="VerifyLoginState" tagprefix="uc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>编辑索引</title>
    <link rel="stylesheet" type="text/css" href="../Css/Style.css" />
    <link rel="stylesheet" type="text/css" href="../Css/Backstage.css" />
    <base target="_self" />
    <script type="text/javascript" src="../Javascript/Common.js"></script>
    <script type="text/javascript">
    // 输入域检查
    function ValidateInput()
    {
        document.getElementById("CateName").value = document.getElementById("CateName").value.trim();
        if (document.getElementById("CateName").value == "") {
            alert("索引名称不能为空！");
            document.getElementById("CateName").focus();
            document.getElementById("CateName").select();
            return false;
        }

        if (checkQuot(document.getElementById("CateName").value)) {
            alert("索引名称中不能含有单引号或双引号！");
            document.getElementById("CateName").focus();
            document.getElementById("CateName").select();
            return false;
        }

        document.getElementById("Seq").value = document.getElementById("Seq").value.trim();
        if (!checkNaturalNumber(document.getElementById("Seq").value)) {
            alert("显示次序必须是正整数！");
            document.getElementById("Seq").focus();
            document.getElementById("Seq").select();
            return false;
        }

        return true;
    }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <uc1:VerifyLoginState ID="VerifyLoginState1" runat="server" />
    <div id="container">
        <div id="editregion">
            <table style="width: 100%;">
                <caption><asp:Label ID="lblTitle" runat="server" Text="编辑索引"></asp:Label></caption>
                <tr>
                    <td class="label"><font color="#ff0000"> ※ </font>索引名称：</td>
                    <td class="input">
                        <asp:TextBox ID="CateName" CssClass="text" MaxLength="20" runat="server"></asp:TextBox>
                    </td>
                    <td class="label"><font color="#ff0000"> ※ </font>显示次序：</td>
                    <td class="input">
                        <asp:TextBox ID="Seq" CssClass="text" MaxLength="4" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="label">索引描述：</td>
                    <td class="input" colspan="3">
                        <asp:TextBox ID="CateDesc" CssClass="text" TextMode="MultiLine" runat="server"></asp:TextBox>
                    </td>
                </tr>
            </table>
        </div>
        <div id="buttonregion">
            <asp:Button ID="btnSave" CssClass="button" runat="server" Text="保存" UseSubmitBehavior="false" onclick="btnSave_Click" OnClientClick="javascript:if(!ValidateInput()) return false;" />
            <input type="button" class="button" value="取消" onclick="javascript:self.close();" />
        </div>
        <div id="tipsregion">
            标有“<font color="#ff0000"> ※ </font>”符号的为必填项。<br />
        </div>
    </div>
    </form>
</body>
</html>
